package org.magento.pages;

import org.magento.data.CustomerData;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;

//This class presents /customer/account/forgotpassword/ page 

public class ForgotCustomerPassword extends Page {
	
	//Locators: 
	@FindBy(id = "email_address")
	public WebElement customerEmailField;
	
	//Locator should be modified 
	@FindBy(css ="div.buttons-set > button.button")
	public WebElement submitButton;
	
	//Functions: 
	public LoginPageFrontEnd resetCustomerPassword(CustomerData customer) {
		type(customerEmailField, customer.email);
		submitButton.click();
		return PageFactory.initElements(driver, LoginPageFrontEnd.class);
	}
	
	//Auto - generated: 
	public ForgotCustomerPassword(WebDriver driver) {
		super(driver);
	}

	@Override
	public void open() {
		 
	}

}
